package com.weixiaodong.ModelDesign.交给子类.FactoryMethod模式.工厂模式实例;

public class Main {
    public static void main(String[] args) {
        Factory factory = new IDCardFactory();
        IDCard card1 = (IDCard) factory.create("tom");
        IDCard card2 = (IDCard) factory.create("jack");
        IDCard card3 = (IDCard) factory.create("jerry");
        card1.use();
        card2.use();
        card3.use();
    }
}
